
function highlightErrFields(invalidInput, msg){	
	if(invalidInput){
		invalidInput.title=msg;
		invalidInput.style.background = '#FFE573';
	}
	//document.getElementById(invalidInput.name+"_field").style.color="#AA0000";
	if(document.getElementById(invalidInput.name+"_field")){
		document.getElementById(invalidInput.name+"_field").className="required";
	}
	
	//invalidInput.className="error";
}

function deHighlightErrFields(fInput)
{
	if(fInput) {
		fInput.style.background = "";
	}
	var field = document.getElementById(fInput.name+"_field");
	if(field){
		field.className="text";
		field.style.color="#000000";
	}
}

function trim(inputval)
{
	return inputval.replace(/^\s+|\s+$/g,"");
}